<?php
/**
 * Load config
 * @author tien.nguyen
 */
if ( ! function_exists('sendemail')){
    function sendemail($from, $to, $subject, $message){
		// To send HTML mail, the Content-type header must be set
		$headers  = 'MIME-Version: 1.0' . "\r\n";
		$headers .= 'Content-type: text/html; charset=utf-8' . "\r\n";
		// Additional headers
		$headers .= 'To: Mevabe <info@mevabe.com>' . "\r\n";
		$headers .= 'From: '.$from. "\r\n";		
		// Mail it
		$body = "Company: ". $message['ContactName']."<br/>";
		$body .= "Địa chỉ: ". $message['ContactAddress']."<br/>";
		$body .= "Email: ". $message['ContactEmail']."<br/>";
		$body .= "Điện thoại: ". $message['ContactPhone']."<br/>";
		$body .= "Nội dung: ". $message['ContactContent']."<br/>";
		return mail($to, $subject, $body, $headers);
    }
}